
{template 'common/header'}
<ul class="nav nav-tabs">
	<li><a href="{php echo create_url('site/module', array('do' => 'Yuyue','op'=>'post', 'name' => 'we7car','weid'=>$weid));}">添加预约</a></li>
	<li><a href="{php echo create_url('site/module', array('do' => 'Yuyue','op'=>'list', 'name' => 'we7car','weid'=>$weid));}">预约管理</a></li>
	<li  class="active"><a href="{php echo create_url('site/module', array('do' => 'Yuyue','op'=>'show', 'name' => 'we7car','weid'=>$weid));}">预约订单</a></li>
</ul>
    <div class="main">
		<div class="stat">
			<div class="stat-div">
				<div class="navbar navbar-static-top">
					<div class="navbar-inner">
						<span class="pull-right" style="color:red; padding:10px 10px 0 0;">总数：<?php echo count($list);?></span>
						<span class="brand">名单</span>
					</div>
				</div>
				<div class="sub-item" id="table-list">
					<h4 class="sub-title" style="float:right;color:red;"><a href="">刷新</a></h4>
					<h4 class="sub-title">预约名单</h4>

					<form action="" method="post" onsubmit="">
					<div class="sub-content">
						<table class="table table-hover">
							<thead class="navbar-inner">
								<tr>
									<th class="row-hover">用户</th>
									<th class="row-hover">电话</th>
									<th class="row-hover">日期</th>
									<th class="row-hover">时间</th>
									<th class="row-hover">表单</th>
									<th class="row-hover">下拉</th>
									<th class="row-hover">备注</th>
									<th class="row-hover">操作</th>
								</tr>
							</thead>
							<tbody>
								{loop $list $v}
								<tr>
									<td style="text-align: center;">
										{$v['contact']}
									</td>
									<td style="text-align: center;">
										{$v['contacttel']}
									</td>
									<td style="text-align: center;">
										{$v['dateline']}
									</td>
									<td style="text-align: center;">
										{$v['timepart']}
									</td>
									<td style="text-align: left;">
										{php $tempArr=explode('$',$v['fieldsigle']);$tempArr=array_splice($tempArr, 1);}
										{loop $tempArr $row} {$row}<br> {/loop}
									</td>
									<td style="text-align: left;">
										{php $tempArr=explode('$',$v['fielddownload']);$tempArr=array_splice($tempArr, 1);}
										{loop $tempArr $row} {$row}<br> {/loop}
									</td>

									<td style="text-align: center;">
										{$v['remark']}
									</td>
									<td>
									{if $v['status']==0}<font color="red">(未处理)</font>
									<a href="{php echo create_url('site/module', array('do' => 'Yuyue', 'name' => 'we7car', 'op'=>'changestatus', 'name' => 'we7car','weid'=>$weid,'id'=>$v['id'],'status' => 2))}">标记已处理</a>
									{else}<font color="green">(已处理)</font>
									<!--<a href="{php echo create_url('index/module', array('do' => 'list', 'name' => 'yuyue', 'id' => $rid, 'wid' => $row['id'], 'status' => 0))}">取消未处理</a>-->
									{/if}
									</td>
								</tr>
								{/loop}
							</tbody>
						</table>
<!-- 						<table class="table">
							<tr style="width:40px;" class="row-first">

									<th style="width:40px;" class="row-first"><input type="checkbox" onclick="selectall(this, 'select');"/>全选</th>


								<td>
									<input type="submit" name="delete" value="删除" class="btn btn-primary" />
									<input type="hidden" name="token" value="{$_W['token']}" />
								</td>
							</tr>
						</table> -->
					</div>
					</form>
					{$pager}
				</div>
			</div>
		</div>
    </div>
<script>
$(function() {
	//详细数据相关操作
	var tdIndex;
	$("#table-list thead").delegate("th", "mouseover", function(){
		if($(this).find("i").hasClass("")) {
			$("#table-list thead th").each(function() {
				if($(this).find("i").hasClass("icon-sort")) $(this).find("i").attr("class", "");
			});
			$("#table-list thead th").eq($(this).index()).find("i").addClass("icon-sort");
		}
	});
	$("#table-list thead th").click(function() {
		if($(this).find("i").length>0) {
			var a = $(this).find("i");
			if(a.hasClass("icon-sort") || a.hasClass("icon-caret-up")) { //递减排序
				/*
					数据处理代码位置
				*/
				$("#table-list thead th i").attr("class", "");
				a.addClass("icon-caret-down");
			} else if(a.hasClass("icon-caret-down")) { //递增排序
				/*
					数据处理代码位置
				*/
				$("#table-list thead th i").attr("class", "");
				a.addClass("icon-caret-up");
			}
			$("#table-list thead th,#table-list tbody:eq(0) td").removeClass("row-hover");
			$(this).addClass("row-hover");
			tdIndex = $(this).index();
			$("#table-list tbody:eq(0) tr").each(function() {
				$(this).find("td").eq(tdIndex).addClass("row-hover");
			});
		}
	});
});
</script>
{template 'common/footer'}